Skip to content

STM32MP2: add I2C support #92185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

TanguyRaufflet
Copy link

@TanguyRaufflet TanguyRaufflet commented Jun 25, 2025

This PR adds I2C support for the STM32MP2 SoC series.

Signed-off-by: Tanguy Raufflet tanguy.raufflet@savoirfairelinux.com

Copy link

Hello @TanguyRaufflet, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@arnopo
Copy link
Contributor

arnopo commented Jun 26, 2025

To simplify the reviews could you split it in 2 PRs one per peripheral?
There is also compliance check issue to fix

@TanguyRaufflet TanguyRaufflet changed the title STM32MP2: add I2C and watchdog support STM32MP2: add I2C support Jun 26, 2025
@TanguyRaufflet
Copy link
Author

To simplify the reviews could you split it in 2 PRs one per peripheral? There is also compliance check issue to fix

Of course, I removed the watchdog-related commits. Since watchdog and i2c edit files in common, I'll post the PR with the watchdog integration after this one has been merged.

Copy link

github-actions bot commented Jul 7, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_stm32 zephyrproject-rtos/hal_stm32@468e5ad zephyrproject-rtos/hal_stm32#293 zephyrproject-rtos/hal_stm32#293/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_stm32 DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 7, 2025
Tanguy Raufflet added 10 commits July 7, 2025 13:31
Update hal_stm32 to include the modifications allowing to read the I2C8
clock frequency in the same way as I2C1-7.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
The STM32MP2 series needs gpioz pinctrl support to be able to use
the GPIOZ pins.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Add support for GPIOZ in the STM32 GPIO driver.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Add GPIO Z node to the device tree for STM32MP2 SoC.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Add clock bindings for I2C peripherals for the STM32MP2 series.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Add I2C clocks rate reading to the STM32MP2 clock driver.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
According to the STM32MP2 reference manual, the I2C controller uses
a single interrupt line for all events (EV + ERR), so the combined
interrupt must be enabled for the STM32MP2 series.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Add I2C nodes in non-secure context to dtsi.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
The I2C is now supported.

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
This commit adds the i2c8 node to the device tree for the
STM32MP257F-EV1 board. This node corresponds to the i2c exposed by the
GPIO expansion connector [1] and not used by the cortex A35.

[1]: https://wiki.st.com/stm32mpu/wiki/STM32MP257x-EV1_-_hardware_description

Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com>
Copy link

sonarqubecloud bot commented Jul 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants